package cn.whale.kill.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author whale.chen
 * @since 2020-11-30
 */
@TableName("t_kill_course")
@Data
public class KillCourse extends Model<KillCourse> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 第几场
     */
    @TableField("session_id")
    private Long sessionId;
    /**
     * 课程名字
     */
    @TableField("course_name")
    private String courseName;
    @TableField("kill_price")
    private BigDecimal killPrice;
    @TableField("kill_count")
    private Integer killCount;
    @TableField("kill_sort")
    private Integer killSort;
    @TableField("kill_limit")
    private Integer killLimit = 1;
    //秒杀随机码，防刷
    @TableField(exist = false)
    private String killCode;
    @TableField("course_pic")
    private String coursePic;
    @TableField(exist = false)
    private Date startTime;
    @TableField(exist = false)
    private Date endTime;
    @TableField(exist = false)
    private Integer status;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
